package mnnu.ghbe.service;

import mnnu.ghbe.entity.Event;
import mnnu.ghbe.repository.EventRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EventService {
    
    @Autowired
    private EventRepository eventRepository;
    
    public List<Event> getEventsByRiskLevel(Integer riskLevel) {
        return eventRepository.findByRiskLevel(riskLevel);
    }
}